<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        img{
            width: 200px;
        }
        figure{
            border:solid 1px red;
            width: 200px;
            position: relative;
        }
    </style>
    <script src="../lib/jquery-1.11.3.min.js"></script>
</head>
<body>
    <div>
        <figure>
            <img src="https://www.baidu.com/img/PCtm_d9c8750bed0b3c7d089fa7d55720d6cf.png" alt="">
        </figure>
        <div>
            <button>显示</button>
            <button>隐藏</button>
            <button>上推</button>
            <button>下拉</button>
            <button>淡隐</button>
            <button>淡显</button>
            <button>自移</button>
        </div>
    </div>
    <script>
        $('div button')[0].onclick=function(){
            $('figure').show(1000)
        }
        $('div button')[1].onclick=function(){
            $('figure').hide(1000)
        }
        $('div button')[2].onclick=function(){
            $('figure').slideUp(1000)
        }
        $('div button')[3].onclick=function(){
            $('figure').slideDown(1000)
        }
        $('div button')[4].onclick=function(){
            $('figure').fadeOut(1000)
        }
        $('div button')[5].onclick=function(){
            $('figure').fadeIn(1000)
        }
        $('div button')[6].onclick=function(){
            $('figure').animate({
                'left':'200px'
            },1000,function(){
                $('figure').animate({
                    'top':'200px'
                },1000,function(){
                    alert('操作完成')
                })
            })
        }
    </script>
</body>
</html>